import { BasicPageParams } from '@/api/model/baseModel';

export type AccountParams = BasicPageParams & {
  username?: string;
  nickname?: string;
};

export type RoleParams = {
  name?: string;
  status?: string;
  code?: string;
};

export type SaveRoleParams = {
  id?: string;
  name: string;
  code: string;
  sort: number;
  grantMenuIdList?: string[];
  remark?: string;
};

export type RolePageParams = BasicPageParams & RoleParams;

export type DeptParams = {
  id: string;
  name: string;
  orderNo: string;
  createTime: string;
  remark: string;
  status: number;
};

export type SaveDeptParams = {
  id?: string;
  pid?: string;
  title: string;
  sort: number;
  status?: string;
};

export type MenuParams = {
  title?: string;
  status?: string;
};

export type SaveMenuParams = {
  id?: number;
  pid?: number;
  type: number;
  hideMenu: string;
  weight: string;
  name: string;
  path: string;
  title: string;
  openType?: string;
  redirect?: string;
  remark?: string;
  component?: string;
  icon?: string;
  frameSrc?: string;
  permission?: string;
  sort: number;
};

export type DictTypeParams = {
  name?: string;
  code?: string;
};

export type SaveDictTypeParams = {
  id?: number;
  name: string;
  code: string;
  sort: number;
  remark: string;
  status: string;
};

export type DictDataParams = {
  name?: string;
  code?: string;
};

export type SaveDictDataParams = {
  id?: string;
  typeId?: string;
  name: string;
  code: string;
  sort: number;
  remark: string;
  status: string;
};

export type ApiSelectModal = {
  label: string;
  value: string;
};
